import axios from '@/service/axios'
import type { GenericAbortSignal } from 'axios'

export class KnowledgeService {
  static async getKnowledgeBase(params: any, signal: GenericAbortSignal) {
    return await axios.post('/api/WenXinWorkShop/GetKnowledgeBase', params, {
      signal
    })
  }

  static async getAccessToken() {
    return await axios.get('/api/WenXinWorkShop/GetAccessToken')
  }

  static async getFileUrl(params: any) {
    return await axios.get('/api/WenXinWorkShop/GetFileUrl', {
      params
    })
  }
}
